home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.6 KB | 131 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Actions.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Jim Lloyd
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef ACTIONS_H
- #define ACTIONS_H
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class ODStorageUnit;
-
- //========================================================================================
- // class CAction
- //========================================================================================
-
- class FW_CLASS_ATTR CAction
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CAction();
- virtual ~CAction();
-
- //----------------------------------------------------------------------------------------
- // Action protocol
- //
- public:
- virtual void Internalize(Environment* ev,
- ODStorageUnit* storage) = 0;
-
- virtual void Externalize(Environment* ev,
- ODStorageUnit* storage) = 0;
-
- virtual void DoIt() = 0;
- };
-
- //========================================================================================
- // class CSoundAction
- //========================================================================================
-
- class FW_CLASS_ATTR CSoundAction : public CAction
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CSoundAction();
- virtual ~CSoundAction();
-
- static FW_Boolean IsInStorage(
- Environment* ev, ODStorageUnit* storage);
-
- //----------------------------------------------------------------------------------------
- // Action protocol
- //
- public:
- virtual void Internalize(Environment* ev,
- ODStorageUnit* storage);
- virtual void Externalize(Environment* ev,
- ODStorageUnit* storage);
- virtual void DoIt();
-
- //----------------------------------------------------------------------------------------
- // Private implementation
- //
- private:
- void InternalizeSound(Environment* ev,
- ODStorageUnit* storage);
- void InternalizeSoundFile(Environment* ev,
- ODStorageUnit* storage);
-
- Handle fSoundHandle;
- };
-
- //========================================================================================
- // class CScriptAction
- //========================================================================================
-
- class FW_CLASS_ATTR CScriptAction : public CAction
- {
- public:
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- CScriptAction();
- virtual ~CScriptAction();
-
- static FW_Boolean IsInStorage(
- Environment* ev,
- ODStorageUnit* storage);
-
- //----------------------------------------------------------------------------------------
- // Action protocol
- //
- public:
- virtual void Internalize(Environment* ev,
- ODStorageUnit* storage);
- virtual void Externalize(Environment* ev,
- ODStorageUnit* storage);
-
- virtual void DoIt();
-
- //----------------------------------------------------------------------------------------
- // Private implementation
- //
- private:
- void InternalizeScript(Environment* ev,
- ODStorageUnit* storage);
- void InternalizeScriptFile(Environment* ev,
- ODStorageUnit* storageUnit);
- static void LoadAndExecuteScript(Handle scriptData);
-
- Handle fScriptHandle;
- };
-
- #endif
-